# -*- coding: utf-8 -*-
# @Time    : 2024/12/18 21:25
# @Author  : xiangbo
# @Email   : xiangbo@163.com
# @File    : datas.py
# @Software: PyCharm
# 操作数据函数模块
"""封装获取测试数据方法"""
import yaml
import os
from common.consts import DATA_PATH


def get_data(*file):
    """
    根据yaml文件返回数据
    """
    file = os.path.join(DATA_PATH, *file)
    with open(file, encoding='utf-8') as f:
        return yaml.safe_load(f)
